package com.suxin.plugin.pf4j;

import com.suxin.plugin.intergration.manager.PluginWrapper;
import com.suxin.plugin.loader.PluginResourceLoadFactory;

/**
 * @author Tang
 * @classname Plugin
 * @description [  ]
 * @date 2022/7/20 22:02
 */
public class BasePlugin {

    protected PluginWrapper pluginWrapper;
    private final PluginResourceLoadFactory pluginResourceLoadFactory;

    public BasePlugin(PluginWrapper pluginWrapper) {
        this.pluginWrapper = pluginWrapper;
        this.pluginResourceLoadFactory = new PluginResourceLoadFactory();
    }

    public PluginWrapper getPluginWrapper() {
        return pluginWrapper;
    }

    public PluginResourceLoadFactory getPluginResourceLoadFactory() {
        return pluginResourceLoadFactory;
    }

    public void start() {
    }

    public void stop() {
    }

    public void delete() {
    }

    /**
     * 获取实现类的包名
     * @return string
     */
    public String scanPackage() {
        return this.getClass().getPackage().getName();
    }

}
